﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AccountAdmin/AdminMaster.master" AutoEventWireup="true" CodeBehind="Insert.aspx.cs" Inherits="PRJ_LDW_Eutoliso.AccountAdmin.Veiculo.Insert" %>

<asp:Content ID="Content1" ContentPlaceHolderID="headTile" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="headScript" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="body_pre_central" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="body_central_first" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="body_central" runat="server">

    <!-- Start Box -->
    <div class="boxes-full">

        <div class="boxes-padding fullpadding">

            <!-- Start None Split Section -->
            <div class="splitnone">

                <div id="portfolio-container">


                    <!-- Start 4 column portfolio -->
                    <div class="element web">

                        <div class="col1">
                            <div class="wrapper_01">
                                <h3>
                                    <div class="wrapper_01">
                                        <li class="under_02"><a href="/AccountAdmin/Home.aspx" title="" class="active">Página Inicial</a></li>
                                        <li class="under_02"><a href="#">Anúncios</a></li>
                                        <li class="under_02"><a href="#">Meus Dados</a></li>
                                        <li class="under_02"><a href="/AccountAdmin/Veiculo/Tipo/Home.aspx" title="" class="active">Categorias</a></li>
                                        <li class="under_02"><a href="/AccountAdmin/Veiculo/Marca/Home.aspx" title="" class="active">Marcas</a></li>
                                        <li class="under_02"><a href="/AccountAdmin/Veiculo/Modelo/Home.aspx" title="" class="active">Modelos</a></li>
                                    </div>
                                </h3>
                            </div>
                        </div>

                    </div>

                    <div class="element graphic">

                        <h3><asp:Label ID="msgImgInserida" runat="server" Text="Imagem 1 Inserida " Visible="False" ForeColor="#CC3300"></asp:Label></h3>
                        <br />

                        <br />

                        <asp:Image ID="Image1" runat="server" />

                        <br />
                        <br />

                        <h3><asp:Label ID="msgImgInserida2" runat="server" Text="Imagem 2 Inserida" Visible="False" ForeColor="#CC3300"></asp:Label></h3>
                        <br />

                        <br />

                        <asp:Image ID="Image2" runat="server" />

                        <br />
                        <br />

                        <h3><asp:Label ID="msgImgInserida3" runat="server" Text="Imagem 3 Inserida" Visible="False" ForeColor="#CC3300"></asp:Label></h3>
                        <br />

                        <br />

                        <asp:Image ID="Image3" runat="server" />

                        <br />
                        <br />

                        <h3><asp:Label ID="msgImgInserida4" runat="server" Text="Imagem 4 Inserida" Visible="False" ForeColor="#CC3300"></asp:Label></h3>
                        <br />

                        <br />

                        <asp:Image ID="Image4" runat="server" />

                    </div>

                    <div class="element logo">
                       <h2> Inserir Veículo </h2>
       
                        <br />
                        <br />

                        <table>
                            <tr>
                                <td>
                                    <h3><asp:Label ID="Label2" Width="150px" runat="server" Text="Título do Anúncio" /></h3>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtTituloAnuncio" runat="server" Width="285px" CssClass="contacttextform"></asp:TextBox>
                                </td>
                            </tr>



                            <tr>
                                <td style="width: 100px">
                                    <h3><asp:Label ID="Label7" runat="server" Text="Categoria" /></h3>
                                </td>
                                <td class="auto-style1">

                                    <asp:DropDownList ID="ddlTipo" runat="server" AppendDataBoundItems="True" DataSourceID="dsVeiculoTipo" DataTextField="Nome" DataValueField="Nome" Height="32px" Width="225px" CssClass="contacttextform">
                                        <asp:ListItem Value="0">Selecione</asp:ListItem>
                                    </asp:DropDownList>

                                </td>
                            </tr>

                            <tr>
                                <td>
                                    <h3><asp:Label ID="Label5" runat="server" Text="Marca" /></h3>
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlMarca" runat="server" DataSourceID="sqlMarca" DataTextField="Nome" DataValueField="Id" Height="32px" Width="225px" CssClass="contacttextform" AppendDataBoundItems="True" AutoPostBack="True">
                                        <asp:ListItem Value="0">Selecione</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <h3><asp:Label ID="Label23" runat="server" Text="Modelo" /></h3>
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlModelo" runat="server" DataSourceID="sqlModelo" DataTextField="Nome" DataValueField="Nome" Height="32px" Width="225px" CssClass="contacttextform" AppendDataBoundItems="True" EnableViewState="False">
                                        <asp:ListItem Value="0">Selecione</asp:ListItem>
                                    </asp:DropDownList>

                                </td>
                            </tr>

                            <tr>
                                <td>
                                    <h3><asp:Label ID="Label1" runat="server" Text="Valor" /></h3>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtValor" runat="server" Width="200px" CssClass="contacttextform"></asp:TextBox>
                                </td>
                            </tr>

                            <tr>
                                <td>
                                    <h3><asp:Label ID="Label6" runat="server" Text="Estado" /></h3>
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlEstado" runat="server" DataSourceID="sqlEstado" DataTextField="Nome" DataValueField="Id" Height="32px" Width="225px" CssClass="contacttextform" AppendDataBoundItems="True" AutoPostBack="True">
                                        <asp:ListItem Value="0">Selecione</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <h3><asp:Label ID="Label3" runat="server" Text="Cidade" /></h3>
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlCidade" runat="server" DataSourceID="sqlCidade" DataTextField="Nome" DataValueField="Nome" Height="32px" Width="225px" CssClass="contacttextform" AppendDataBoundItems="True" EnableViewState="False">
                                        <asp:ListItem Value="0">Selecione</asp:ListItem>
                                    </asp:DropDownList>

                                </td>
                            </tr>

                            <tr>
                                <td style="width: 100px">
                                    <h3><asp:Label ID="Label14" runat="server" Text="Nº de Portas" /></h3>
                                </td>
                                <td class="auto-style1">
                                    <asp:DropDownList ID="ddlPortas" runat="server" Height="32px" Width="225px" CssClass="contacttextform">
                                        <asp:ListItem Value="0">Selecione</asp:ListItem>
                                        <asp:ListItem Value="2">2</asp:ListItem>
                                        <asp:ListItem Value="4">4</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>

                            <tr>
                                <td style="width: 100px">
                                    <h3><asp:Label ID="Label15" runat="server" Text="Câmbio" /></h3>
                                </td>
                                <td class="auto-style1">
                                    <asp:DropDownList ID="ddlCambio" runat="server" Height="32px" Width="225px" CssClass="contacttextform">
                                        <asp:ListItem Value="0">Selecione</asp:ListItem>
                                        <asp:ListItem Value="Automático">Automático</asp:ListItem>
                                        <asp:ListItem Value="Automatizado">Automatizado</asp:ListItem>                                        
                                        <asp:ListItem Value="Manual">Manual</asp:ListItem>
                                        <asp:ListItem Value="Semi-Automático">Semi-Automático</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>

                            <tr>
                                <td style="width: 100px">
                                    <h3><asp:Label ID="Label21" runat="server" Text="Situação" /></h3>
                                </td>
                                <td class="auto-style1">
                                    <asp:DropDownList ID="ddlSituacao" runat="server" Height="32px" Width="225px" CssClass="contacttextform">
                                        <asp:ListItem Value="0">Selecione</asp:ListItem>
                                        <asp:ListItem Value="Novo">Novo</asp:ListItem>
                                        <asp:ListItem>Semi-Novo</asp:ListItem>
                                        <asp:ListItem Value="Usado">Usado</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>

                            <tr>
                                <td style="width: 100px">
                                    <h3><asp:Label ID="Label22" runat="server" Text="Intenção" /></h3>
                                </td>
                                <td class="auto-style1">
                                    <asp:DropDownList ID="ddlIntencao" runat="server" Height="32px" Width="225px" CssClass="contacttextform">
                                        <asp:ListItem Value="0">Selecione</asp:ListItem>
                                        <asp:ListItem Value="Comprar">Alugar</asp:ListItem>
                                        <asp:ListItem>Comprar</asp:ListItem>
                                        <asp:ListItem Value="Vender">Vender</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>

                            <tr>
                                <td style="width: 100px">
                                    <h3><asp:Label ID="Label16" runat="server" Text="Cor" /></h3>
                                </td>
                                <td class="auto-style1">
                                    <asp:DropDownList ID="ddlCor" runat="server" Height="32px" Width="225px" CssClass="contacttextform">
                                        <asp:ListItem Value="0">Selecione</asp:ListItem>
                                        <asp:ListItem>Amarelo</asp:ListItem>
                                        <asp:ListItem>Azul</asp:ListItem>
                                        <asp:ListItem>Bege</asp:ListItem>
                                        <asp:ListItem>Branco</asp:ListItem>
                                        <asp:ListItem>Cinza</asp:ListItem>
                                        <asp:ListItem>Dourado</asp:ListItem>
                                        <asp:ListItem>Laranja</asp:ListItem>
                                        <asp:ListItem>Prata</asp:ListItem>
                                        <asp:ListItem>Preto</asp:ListItem>
                                        <asp:ListItem>Roxo</asp:ListItem>
                                        <asp:ListItem>Verde</asp:ListItem>
                                        <asp:ListItem>Vermelho</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>

                            <tr>
                                <td style="width: 100px">
                                    <h3><asp:Label ID="Label17" runat="server" Text="Km" /></h3>
                                </td>
                                <td class="auto-style1">
                                    <asp:TextBox ID="txtKm" runat="server"  Width="200px" CssClass="contacttextform"></asp:TextBox>
                                </td>
                            </tr>

                            <tr>
                                <td style="width: 100px">
                                    <h3><asp:Label ID="Label18" runat="server" Text="Ano" /></h3>
                                </td>
                                <td class="auto-style1">
                                    <asp:DropDownList ID="ddlAno" runat="server" Height="32px" Width="225px" CssClass="contacttextform">
                                        <asp:ListItem>Selecione</asp:ListItem>
                                        <asp:ListItem>2013</asp:ListItem>
                                        <asp:ListItem>2012</asp:ListItem>
                                        <asp:ListItem>2011</asp:ListItem>
                                        <asp:ListItem>2010</asp:ListItem>
                                        <asp:ListItem>2009</asp:ListItem>
                                        <asp:ListItem>2008</asp:ListItem>
                                        <asp:ListItem>2007</asp:ListItem>
                                        <asp:ListItem>2006</asp:ListItem>
                                        <asp:ListItem>2005</asp:ListItem>
                                        <asp:ListItem>2004</asp:ListItem>
                                        <asp:ListItem>2003</asp:ListItem>
                                        <asp:ListItem>2002</asp:ListItem>
                                        <asp:ListItem>2001</asp:ListItem>
                                        <asp:ListItem>2000</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>

                            <tr>
                                <td style="width: 100px">
                                    <h3><asp:Label ID="Label19" runat="server" Text="Combustível" /></h3>
                                </td>
                                <td class="auto-style1">
                                    <asp:DropDownList ID="ddlCombustivel" Height="32px" Width="225px" CssClass="contacttextform" runat="server">
                                        <asp:ListItem Value="0">Selecione</asp:ListItem>
                                        <asp:ListItem>Álcool</asp:ListItem>
                                        <asp:ListItem>Diesel</asp:ListItem>
                                        <asp:ListItem>HíbridoElétrico</asp:ListItem>
                                        <asp:ListItem>Gás Natual</asp:ListItem>
                                        <asp:ListItem>Gasolina</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>

                            <tr>
                                <td style="width: 100px">
                                    <h3><asp:Label ID="Label20" runat="server" Text="Carroceria" /></h3>
                                </td>
                                <td class="auto-style1" style="margin-left: 40px">
                                    <asp:DropDownList ID="ddlCarroceria" Height="32px" Width="225px" CssClass="contacttextform" runat="server">
                                        <asp:ListItem Value="0">Selecione</asp:ListItem>
                                        <asp:ListItem>Coupé</asp:ListItem>
                                        <asp:ListItem>Conversível</asp:ListItem>
                                        <asp:ListItem>Hatch</asp:ListItem>
                                        <asp:ListItem>Perua</asp:ListItem>
                                        <asp:ListItem>Sedan</asp:ListItem>
                                    </asp:DropDownList>

                                </td>
                            </tr>

                            <tr>
                                <td style="width: 100px">
                                    <h3><asp:Label ID="Label8" runat="server" Text="Imagem" /></h3>
                                </td>
                                <td class="auto-style1">

                                    <asp:FileUpload ID="FileUploadControl" runat="server" Width="285px" CssClass="contacttextform" />
                                    <%--<asp:Button runat="server" ID="UploadButton" Text="Upload" OnClick="UploadButton_Click" />--%>
                                    
                                </td>
                            </tr>

                            <tr>
                                <td style="width: 100px">
                                    <h3><asp:Label ID="Label4" runat="server" Text="Imagem" /></h3>
                                </td>
                                <td class="auto-style1">
                                    <asp:FileUpload ID="FileUploadControl1" runat="server"  Width="285px" CssClass="contacttextform"/>
                                </td>
                            </tr>

                            <tr>
                                <td style="width: 100px">
                                    <h3><asp:Label ID="Label11" runat="server" Text="Imagem" /></h3>
                                </td>
                                <td class="auto-style1">
                                    <asp:FileUpload ID="FileUploadControl2" runat="server"  Width="285px" CssClass="contacttextform"/>
                                </td>
                            </tr>

                            <tr>
                                <td style="width: 100px">
                                    <h3><asp:Label ID="Label13" runat="server" Text="Imagem" /></h3>
                                </td>
                                <td class="auto-style1">
                                    <asp:FileUpload ID="FileUploadControl3" runat="server"  Width="285px" CssClass="contacttextform"/>
                                </td>
                            </tr>

                            <tr>
                                <td style="width: 100px">
                                    <h3><asp:Label ID="Label9" runat="server" Text="Desc. Exterior" /></h3>
                                </td>
                                <td class="auto-style1">
                                    <asp:TextBox ID="txtDescExterior" runat="server" Height="97px" TextMode="MultiLine"  Width="285px" CssClass="contacttextform"></asp:TextBox>
                                </td>
                            </tr>

                            <tr>
                                <td style="width: 100px">
                                    <h3><asp:Label ID="Label12" runat="server" Text="Desc. Interior" /></h3>
                                </td>
                                <td class="auto-style1">
                                    <asp:TextBox ID="txtDescricaoInterior" runat="server" Height="97px" TextMode="MultiLine"  Width="285px" CssClass="contacttextform"></asp:TextBox>
                                </td>
                            </tr>

                            <tr>
                                <td style="width: 100px">
                                    <h3><asp:Label ID="Label10" runat="server" Text="Descrição Geral" /></h3>
                                </td>
                                <td class="auto-style1">
                                    <asp:TextBox ID="txtDescricao" runat="server" Height="97px" TextMode="MultiLine"  Width="285px" CssClass="contacttextform"></asp:TextBox>
                                </td>
                            </tr>

                        </table>
                    
                        <br/>

                        <table>
                            <tr>
                                <td>
                                    <asp:LinkButton ID="btnInserir" runat="server" Text="Inserir" OnClick="btnInserir_Click" CssClass="smallsmoothrectange orangebutton"/>
                                </td>
                                <td>
                                    <asp:LinkButton ID="btnCancelar" runat="server" Text="Cancelar" OnClick="btnCancelar_Click" CssClass="smallsmoothrectange orangebutton"/>
                               </td>
                            </tr>
                        </table>
                        <br /> 
                         &nbsp;<a href="Home.aspx" class="smallsmoothrectange orangebutton">Mostrar todos</a>
                        <br /><br />
                        <h3><asp:Label runat="server" ID="StatusLabel" ForeColor="Red" Text="" /></h3>
                        <br />
                        <h3><asp:Label runat="server" ID="StatusLabel1" ForeColor="Red" Text="" /></h3>
                        <br />
                        <h3><asp:Label ID="lblMsg" runat="server" ForeColor="Red" Text="Item inserido com sucesso!" Visible="False"></asp:Label></h3><br />
                        <h3><asp:Label ID="lblMsgException" runat="server" ForeColor="Red" Text="Ocorreu um problema ao inserir o item.!" Visible="False"></asp:Label></h3>
                        <br />
                        <br>
                       
                        <asp:EntityDataSource ID="dsVeiculoTipo" runat="server" ConnectionString="name=eutolisodbEntities1" DefaultContainerName="eutolisodbEntities1" EnableFlattening="False" EntitySetName="veiculotipo" Select="it.[Id], it.[Nome]">
                        </asp:EntityDataSource>
                        <asp:EntityDataSource ID="EntityDataSource2" runat="server" ConnectionString="name=eutolisodbEntities1" DefaultContainerName="eutolisodbEntities1" EnableDelete="True" EnableFlattening="False" EnableInsert="True" EnableUpdate="True" EntitySetName="cidade">
                        </asp:EntityDataSource>
                        <asp:SqlDataSource ID="sqlEstado" runat="server" ConnectionString="<%$ ConnectionStrings:eutolisodbConnectionString %>" SelectCommand="SELECT [Id], [Nome] FROM [estado]"></asp:SqlDataSource>
                        <asp:SqlDataSource ID="sqlCidade" runat="server" ConnectionString="<%$ ConnectionStrings:eutolisodbConnectionString %>" SelectCommand="SELECT [Id], [Nome] FROM [cidade] WHERE ([Estado] = @Estado)">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="ddlEstado" Name="Estado" PropertyName="SelectedValue" Type="Int32" />
                            </SelectParameters>
                        </asp:SqlDataSource>

                        <asp:SqlDataSource ID="sqlModelo" runat="server" ConnectionString="<%$ ConnectionStrings:eutolisodbConnectionString %>" SelectCommand="SELECT [Id], [Nome] FROM [modelo] WHERE ([Marca] = @Marca)">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="ddlMarca" Name="Marca" PropertyName="SelectedValue" />
                            </SelectParameters>
                        </asp:SqlDataSource>

                        <asp:SqlDataSource ID="sqlMarca" runat="server" ConnectionString="<%$ ConnectionStrings:eutolisodbConnectionString %>" SelectCommand="SELECT [Id], [Nome] FROM [marca] "></asp:SqlDataSource>
                        <asp:SqlDataSource ID="sqlCategoria" runat="server" ConnectionString="<%$ ConnectionStrings:eutolisodbConnectionString %>" SelectCommand="SELECT [Id], [Nome] FROM [veiculotipo] ORDER BY [Nome]"></asp:SqlDataSource>

                        <br>
                    </div>

                    <!-- End 4 column portfolio -->

                </div>

            </div>
            <!-- End None Split Section -->

        </div>

    </div>
    <!-- End Box -->


</asp:Content>
